package vip.youngboy.freejump.handler.task;

import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import vip.youngboy.freejump.constant.TaskActionType;
import vip.youngboy.freejump.domain.FlowRequestParam;
import vip.youngboy.freejump.domain.TaskActionModel;
import vip.youngboy.freejump.domain.process.Option;

import java.util.List;

/**
 * 驳回到指定节点，通过自由跳转实现
 */
@Component
public class TaskReject2ActionHandler extends AbstractTaskActionHandler {

    @Override
    public void doHandleAction(TaskActionModel taskActionModel) {
        //执行驳回到指定节点逻辑

    }

    @Override
    public void vaildOptions(FlowRequestParam flowRequestParam) {
        Assert.notNull(flowRequestParam.getDestination(), "目标节点不能为空");
        Assert.notNull(flowRequestParam.getOpinion(), "驳回意见不能为空");
    }

    @Override
    public TaskActionType supportAction() {
        return TaskActionType.REJECT2;
    }

    @Override
    public List<Option> getOptions() {
        return null;
    }

}
